using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using ShopPowerTemplate.Entities;

namespace ShopPowerTemplate.WcfService
{
    public class WebServiceBase : IWebServiceBase 
    {
        //public List<Address> FindAllAddress()
        //{
        //    ShopPowerTemplate.Services.IAddressService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAddressService>();
        //    return service.FindAll();
        //}

        //public Address FindAddress(int id)
        //{
        //    ShopPowerTemplate.Services.IAddressService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAddressService>();
        //    return service.Find(id);
        //}

        //public Address AddAddress(Address address)
        //{
        //    ShopPowerTemplate.Services.IAddressService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAddressService>();
        //    service.Add(address);

        //    return address;
        //}

        //public void ChangeAddress(Address address)
        //{
        //    ShopPowerTemplate.Services.IAddressService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAddressService>();
        //    service.Change(address);
        //}
		
        //public void RemoveAddress(Address address)
        //{
        //    ShopPowerTemplate.Services.IAddressService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAddressService>();
        //    service.Remove(address);
        //}
		
        //public List<Address> SearchAddress(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IAddressService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAddressService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountAddress(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IAddressService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAddressService>();
        //    return service.SearchCount(searchValue);
        //}

        //public List<AppSettings> FindAllAppSettings()
        //{
        //    ShopPowerTemplate.Services.IAppSettingsService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAppSettingsService>();
        //    return service.FindAll();
        //}

        //public AppSettings FindAppSettings(int id)
        //{
        //    ShopPowerTemplate.Services.IAppSettingsService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAppSettingsService>();
        //    return service.Find(id);
        //}

        //public AppSettings AddAppSettings(AppSettings appSettings)
        //{
        //    ShopPowerTemplate.Services.IAppSettingsService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAppSettingsService>();
        //    service.Add(appSettings);

        //    return appSettings;
        //}

        //public void ChangeAppSettings(AppSettings appSettings)
        //{
        //    ShopPowerTemplate.Services.IAppSettingsService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAppSettingsService>();
        //    service.Change(appSettings);
        //}
		
        //public void RemoveAppSettings(AppSettings appSettings)
        //{
        //    ShopPowerTemplate.Services.IAppSettingsService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAppSettingsService>();
        //    service.Remove(appSettings);
        //}
		
        //public List<AppSettings> SearchAppSettings(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IAppSettingsService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAppSettingsService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountAppSettings(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IAppSettingsService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IAppSettingsService>();
        //    return service.SearchCount(searchValue);
        //}

        //public List<Category> FindAllCategory()
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    return service.FindAll();
        //}

        //public Category FindCategory(int id)
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    return service.Find(id);
        //}

        //public Category AddCategory(Category category)
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    service.Add(category);

        //    return category;
        //}

        //public void ChangeCategory(Category category)
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    service.Change(category);
        //}
		
        //public void RemoveCategory(Category category)
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    service.Remove(category);
        //}
		
        //public List<Category> SearchCategory(string searchValue)
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountCategory(string searchValue)
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    return service.SearchCount(searchValue);
        //}

		
        //public void CategoryAddSubcategories(Category category, Subcategory subcategories)
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    service.AddSubcategories(category, subcategories);
        //}

        //public void CategoryRemoveSubcategories(Category category, Subcategory subcategories)
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    service.RemoveSubcategories(category, subcategories);
        //}

        //public List<Subcategory> CategoryGetSubcategoriesFor(Category category)
        //{
        //    ShopPowerTemplate.Services.ICategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICategoryService>();
        //    category = service.Find(category.Id);

        //    return category.Subcategories.ToList();
        //}
        //public List<Customer> FindAllCustomer()
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    return service.FindAll();
        //}

        //public Customer FindCustomer(int id)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    return service.Find(id);
        //}

        //public Customer AddCustomer(Customer customer)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    service.Add(customer);

        //    return customer;
        //}

        //public void ChangeCustomer(Customer customer)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    service.Change(customer);
        //}
		
        //public void RemoveCustomer(Customer customer)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    service.Remove(customer);
        //}
		
        //public List<Customer> SearchCustomer(string searchValue)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountCustomer(string searchValue)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    return service.SearchCount(searchValue);
        //}

		
        //public void CustomerAddReviews(Customer customer, Review reviews)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    service.AddReviews(customer, reviews);
        //}

        //public void CustomerRemoveReviews(Customer customer, Review reviews)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    service.RemoveReviews(customer, reviews);
        //}

        //public List<Review> CustomerGetReviewsFor(Customer customer)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    customer = service.Find(customer.Id);

        //    return customer.Reviews.ToList();
        //}
		
        //public void CustomerAddOrders(Customer customer, Order orders)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    service.AddOrders(customer, orders);
        //}

        //public void CustomerRemoveOrders(Customer customer, Order orders)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    service.RemoveOrders(customer, orders);
        //}

        //public List<Order> CustomerGetOrdersFor(Customer customer)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    customer = service.Find(customer.Id);

        //    return customer.Orders.ToList();
        //}
		
        //public void CustomerAddAddresses(Customer customer, Address addresses)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    service.AddAddresses(customer, addresses);
        //}

        //public void CustomerRemoveAddresses(Customer customer, Address addresses)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    service.RemoveAddresses(customer, addresses);
        //}

        //public List<Address> CustomerGetAddressesFor(Customer customer)
        //{
        //    ShopPowerTemplate.Services.ICustomerService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ICustomerService>();
        //    customer = service.Find(customer.Id);

        //    return customer.Addresses.ToList();
        //}
        //public List<Image> FindAllImage()
        //{
        //    ShopPowerTemplate.Services.IImageService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IImageService>();
        //    return service.FindAll();
        //}

        //public Image FindImage(int id)
        //{
        //    ShopPowerTemplate.Services.IImageService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IImageService>();
        //    return service.Find(id);
        //}

        //public Image AddImage(Image image)
        //{
        //    ShopPowerTemplate.Services.IImageService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IImageService>();
        //    service.Add(image);

        //    return image;
        //}

        //public void ChangeImage(Image image)
        //{
        //    ShopPowerTemplate.Services.IImageService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IImageService>();
        //    service.Change(image);
        //}
		
        //public void RemoveImage(Image image)
        //{
        //    ShopPowerTemplate.Services.IImageService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IImageService>();
        //    service.Remove(image);
        //}
		
        //public List<Image> SearchImage(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IImageService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IImageService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountImage(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IImageService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IImageService>();
        //    return service.SearchCount(searchValue);
        //}

        //public List<Option> FindAllOption()
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    return service.FindAll();
        //}

        //public Option FindOption(int id)
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    return service.Find(id);
        //}

        //public Option AddOption(Option option)
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    service.Add(option);

        //    return option;
        //}

        //public void ChangeOption(Option option)
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    service.Change(option);
        //}
		
        //public void RemoveOption(Option option)
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    service.Remove(option);
        //}
		
        //public List<Option> SearchOption(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountOption(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    return service.SearchCount(searchValue);
        //}

		
        //public void OptionAddProductDetails(Option option, ProductDetail productDetails)
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    service.AddProductDetails(option, productDetails);
        //}

        //public void OptionRemoveProductDetails(Option option, ProductDetail productDetails)
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    service.RemoveProductDetails(option, productDetails);
        //}

        //public List<ProductDetail> OptionGetProductDetailsFor(Option option)
        //{
        //    ShopPowerTemplate.Services.IOptionService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionService>();
        //    option = service.Find(option.Id);

        //    return option.ProductDetails.ToList();
        //}
        //public List<OptionType> FindAllOptionType()
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    return service.FindAll();
        //}

        //public OptionType FindOptionType(int id)
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    return service.Find(id);
        //}

        //public OptionType AddOptionType(OptionType optionType)
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    service.Add(optionType);

        //    return optionType;
        //}

        //public void ChangeOptionType(OptionType optionType)
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    service.Change(optionType);
        //}
		
        //public void RemoveOptionType(OptionType optionType)
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    service.Remove(optionType);
        //}
		
        //public List<OptionType> SearchOptionType(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountOptionType(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    return service.SearchCount(searchValue);
        //}

		
        //public void OptionTypeAddOptions(OptionType optionType, Option options)
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    service.AddOptions(optionType, options);
        //}

        //public void OptionTypeRemoveOptions(OptionType optionType, Option options)
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    service.RemoveOptions(optionType, options);
        //}

        //public List<Option> OptionTypeGetOptionsFor(OptionType optionType)
        //{
        //    ShopPowerTemplate.Services.IOptionTypeService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOptionTypeService>();
        //    optionType = service.Find(optionType.Id);

        //    return optionType.Options.ToList();
        //}
        //public List<Order> FindAllOrder()
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    return service.FindAll();
        //}

        //public Order FindOrder(int id)
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    return service.Find(id);
        //}

        //public Order AddOrder(Order order)
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    service.Add(order);

        //    return order;
        //}

        //public void ChangeOrder(Order order)
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    service.Change(order);
        //}
		
        //public void RemoveOrder(Order order)
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    service.Remove(order);
        //}
		
        //public List<Order> SearchOrder(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountOrder(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    return service.SearchCount(searchValue);
        //}

		
        //public void OrderAddOrderDetails(Order order, OrderDetail orderDetails)
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    service.AddOrderDetails(order, orderDetails);
        //}

        //public void OrderRemoveOrderDetails(Order order, OrderDetail orderDetails)
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    service.RemoveOrderDetails(order, orderDetails);
        //}

        //public List<OrderDetail> OrderGetOrderDetailsFor(Order order)
        //{
        //    ShopPowerTemplate.Services.IOrderService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderService>();
        //    order = service.Find(order.Id);

        //    return order.OrderDetails.ToList();
        //}
        //public List<OrderDetail> FindAllOrderDetail()
        //{
        //    ShopPowerTemplate.Services.IOrderDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderDetailService>();
        //    return service.FindAll();
        //}

        //public OrderDetail FindOrderDetail(int id)
        //{
        //    ShopPowerTemplate.Services.IOrderDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderDetailService>();
        //    return service.Find(id);
        //}

        //public OrderDetail AddOrderDetail(OrderDetail orderDetail)
        //{
        //    ShopPowerTemplate.Services.IOrderDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderDetailService>();
        //    service.Add(orderDetail);

        //    return orderDetail;
        //}

        //public void ChangeOrderDetail(OrderDetail orderDetail)
        //{
        //    ShopPowerTemplate.Services.IOrderDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderDetailService>();
        //    service.Change(orderDetail);
        //}
		
        //public void RemoveOrderDetail(OrderDetail orderDetail)
        //{
        //    ShopPowerTemplate.Services.IOrderDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderDetailService>();
        //    service.Remove(orderDetail);
        //}
		
        //public List<OrderDetail> SearchOrderDetail(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOrderDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderDetailService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountOrderDetail(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOrderDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderDetailService>();
        //    return service.SearchCount(searchValue);
        //}

        //public List<OrderState> FindAllOrderState()
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    return service.FindAll();
        //}

        //public OrderState FindOrderState(int id)
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    return service.Find(id);
        //}

        //public OrderState AddOrderState(OrderState orderState)
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    service.Add(orderState);

        //    return orderState;
        //}

        //public void ChangeOrderState(OrderState orderState)
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    service.Change(orderState);
        //}
		
        //public void RemoveOrderState(OrderState orderState)
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    service.Remove(orderState);
        //}
		
        //public List<OrderState> SearchOrderState(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountOrderState(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    return service.SearchCount(searchValue);
        //}

		
        //public void OrderStateAddOrders(OrderState orderState, Order orders)
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    service.AddOrders(orderState, orders);
        //}

        //public void OrderStateRemoveOrders(OrderState orderState, Order orders)
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    service.RemoveOrders(orderState, orders);
        //}

        //public List<Order> OrderStateGetOrdersFor(OrderState orderState)
        //{
        //    ShopPowerTemplate.Services.IOrderStateService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IOrderStateService>();
        //    orderState = service.Find(orderState.Id);

        //    return orderState.Orders.ToList();
        //}
        //public List<Product> FindAllProduct()
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    return service.FindAll();
        //}

        //public Product FindProduct(int id)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    return service.Find(id);
        //}

        //public Product AddProduct(Product product)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    service.Add(product);

        //    return product;
        //}

        //public void ChangeProduct(Product product)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    service.Change(product);
        //}
		
        //public void RemoveProduct(Product product)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    service.Remove(product);
        //}
		
        //public List<Product> SearchProduct(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountProduct(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    return service.SearchCount(searchValue);
        //}

		
        //public void ProductAddImages(Product product, Image images)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    service.AddImages(product, images);
        //}

        //public void ProductRemoveImages(Product product, Image images)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    service.RemoveImages(product, images);
        //}

        //public List<Image> ProductGetImagesFor(Product product)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    product = service.Find(product.Id);

        //    return product.Images.ToList();
        //}
		
        //public void ProductAddReviews(Product product, Review reviews)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    service.AddReviews(product, reviews);
        //}

        //public void ProductRemoveReviews(Product product, Review reviews)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    service.RemoveReviews(product, reviews);
        //}

        //public List<Review> ProductGetReviewsFor(Product product)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    product = service.Find(product.Id);

        //    return product.Reviews.ToList();
        //}
		
        //public void ProductAddProductDetails(Product product, ProductDetail productDetails)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    service.AddProductDetails(product, productDetails);
        //}

        //public void ProductRemoveProductDetails(Product product, ProductDetail productDetails)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    service.RemoveProductDetails(product, productDetails);
        //}

        //public List<ProductDetail> ProductGetProductDetailsFor(Product product)
        //{
        //    ShopPowerTemplate.Services.IProductService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductService>();
        //    product = service.Find(product.Id);

        //    return product.ProductDetails.ToList();
        //}
        //public List<ProductDetail> FindAllProductDetail()
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    return service.FindAll();
        //}

        //public ProductDetail FindProductDetail(int id)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    return service.Find(id);
        //}

        //public ProductDetail AddProductDetail(ProductDetail productDetail)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    service.Add(productDetail);

        //    return productDetail;
        //}

        //public void ChangeProductDetail(ProductDetail productDetail)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    service.Change(productDetail);
        //}
		
        //public void RemoveProductDetail(ProductDetail productDetail)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    service.Remove(productDetail);
        //}
		
        //public List<ProductDetail> SearchProductDetail(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountProductDetail(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    return service.SearchCount(searchValue);
        //}

		
        //public void ProductDetailAddOrderDetails(ProductDetail productDetail, OrderDetail orderDetails)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    service.AddOrderDetails(productDetail, orderDetails);
        //}

        //public void ProductDetailRemoveOrderDetails(ProductDetail productDetail, OrderDetail orderDetails)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    service.RemoveOrderDetails(productDetail, orderDetails);
        //}

        //public List<OrderDetail> ProductDetailGetOrderDetailsFor(ProductDetail productDetail)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    productDetail = service.Find(productDetail.Id);

        //    return productDetail.OrderDetails.ToList();
        //}
		
        //public void ProductDetailAddOption(ProductDetail productDetail, Option option)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    service.AddOption(productDetail, option);
        //}

        //public void ProductDetailRemoveOption(ProductDetail productDetail, Option option)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    service.RemoveOption(productDetail, option);
        //}

        //public List<Option> ProductDetailGetOptionFor(ProductDetail productDetail)
        //{
        //    ShopPowerTemplate.Services.IProductDetailService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IProductDetailService>();
        //    productDetail = service.Find(productDetail.Id);

        //    return productDetail.Option.ToList();
        //}
        //public List<Review> FindAllReview()
        //{
        //    ShopPowerTemplate.Services.IReviewService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IReviewService>();
        //    return service.FindAll();
        //}

        //public Review FindReview(int id)
        //{
        //    ShopPowerTemplate.Services.IReviewService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IReviewService>();
        //    return service.Find(id);
        //}

        //public Review AddReview(Review review)
        //{
        //    ShopPowerTemplate.Services.IReviewService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IReviewService>();
        //    service.Add(review);

        //    return review;
        //}

        //public void ChangeReview(Review review)
        //{
        //    ShopPowerTemplate.Services.IReviewService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IReviewService>();
        //    service.Change(review);
        //}
		
        //public void RemoveReview(Review review)
        //{
        //    ShopPowerTemplate.Services.IReviewService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IReviewService>();
        //    service.Remove(review);
        //}
		
        //public List<Review> SearchReview(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IReviewService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IReviewService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountReview(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IReviewService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IReviewService>();
        //    return service.SearchCount(searchValue);
        //}

        //public List<ShippingCost> FindAllShippingCost()
        //{
        //    ShopPowerTemplate.Services.IShippingCostService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IShippingCostService>();
        //    return service.FindAll();
        //}

        //public ShippingCost FindShippingCost(int id)
        //{
        //    ShopPowerTemplate.Services.IShippingCostService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IShippingCostService>();
        //    return service.Find(id);
        //}

        //public ShippingCost AddShippingCost(ShippingCost shippingCost)
        //{
        //    ShopPowerTemplate.Services.IShippingCostService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IShippingCostService>();
        //    service.Add(shippingCost);

        //    return shippingCost;
        //}

        //public void ChangeShippingCost(ShippingCost shippingCost)
        //{
        //    ShopPowerTemplate.Services.IShippingCostService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IShippingCostService>();
        //    service.Change(shippingCost);
        //}
		
        //public void RemoveShippingCost(ShippingCost shippingCost)
        //{
        //    ShopPowerTemplate.Services.IShippingCostService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IShippingCostService>();
        //    service.Remove(shippingCost);
        //}
		
        //public List<ShippingCost> SearchShippingCost(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IShippingCostService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IShippingCostService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountShippingCost(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IShippingCostService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IShippingCostService>();
        //    return service.SearchCount(searchValue);
        //}

        //public List<Subcategory> FindAllSubcategory()
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    return service.FindAll();
        //}

        //public Subcategory FindSubcategory(int id)
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    return service.Find(id);
        //}

        //public Subcategory AddSubcategory(Subcategory subcategory)
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    service.Add(subcategory);

        //    return subcategory;
        //}

        //public void ChangeSubcategory(Subcategory subcategory)
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    service.Change(subcategory);
        //}
		
        //public void RemoveSubcategory(Subcategory subcategory)
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    service.Remove(subcategory);
        //}
		
        //public List<Subcategory> SearchSubcategory(string searchValue)
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountSubcategory(string searchValue)
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    return service.SearchCount(searchValue);
        //}

		
        //public void SubcategoryAddProducts(Subcategory subcategory, Product products)
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    service.AddProducts(subcategory, products);
        //}

        //public void SubcategoryRemoveProducts(Subcategory subcategory, Product products)
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    service.RemoveProducts(subcategory, products);
        //}

        //public List<Product> SubcategoryGetProductsFor(Subcategory subcategory)
        //{
        //    ShopPowerTemplate.Services.ISubcategoryService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.ISubcategoryService>();
        //    subcategory = service.Find(subcategory.Id);

        //    return subcategory.Products.ToList();
        //}
        //public List<User> FindAllUser()
        //{
        //    ShopPowerTemplate.Services.IUserService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IUserService>();
        //    return service.FindAll();
        //}

        //public User FindUser(int id)
        //{
        //    ShopPowerTemplate.Services.IUserService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IUserService>();
        //    return service.Find(id);
        //}

        //public User AddUser(User user)
        //{
        //    ShopPowerTemplate.Services.IUserService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IUserService>();
        //    service.Add(user);

        //    return user;
        //}

        //public void ChangeUser(User user)
        //{
        //    ShopPowerTemplate.Services.IUserService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IUserService>();
        //    service.Change(user);
        //}
		
        //public void RemoveUser(User user)
        //{
        //    ShopPowerTemplate.Services.IUserService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IUserService>();
        //    service.Remove(user);
        //}
		
        //public List<User> SearchUser(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IUserService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IUserService>();
        //    return service.Search(searchValue);
        //}
		
        //public int SearchCountUser(string searchValue)
        //{
        //    ShopPowerTemplate.Services.IUserService service = IoC.IoCFactory.Resolve<ShopPowerTemplate.Services.IUserService>();
        //    return service.SearchCount(searchValue);
        //}

    }
}

